import { http } from '@/common/request/service/service.js';

const metchonService = {
    async getInstitutionList(pid) {
        return await http.post(`/metchon/getInstitutionList?pid=${pid}`);
    },
	async getTypesList() {
	    return await http.post(`/metchon/getTypesList`);
	},
	async add(data) {
        return await http.post(`/metchon/add`,data);
    },
	async list(pageNo,pageSize) {
	    return await http.get(`/metchon/list?pageNo=${pageNo}&pageSize=${pageSize}`);
	},
	async faultList(pageNo,pageSize) {
	    return await http.get(`/metchon/faultList?pageNo=${pageNo}&pageSize=${pageSize}`);
	},
	async inspectionList(pageNo,pageSize) {
	    return await http.get(`/metchon/inspectionList?pageNo=${pageNo}&pageSize=${pageSize}`);
	},
	async queryInspectionById(id) {
	    return await http.get(`/metchon/queryInspectionById?id=${id}`);
	},
	async queryById(id) {
	    return await http.get(`/metchon/queryById?id=${id}`);
	},
	async queryMaintenanceById(id) {
	    return await http.get(`/metchon/queryMaintenanceById?id=${id}`);
	},
	async delete(id) {
	    return await http.post(`/metchon/delete?id=${id}`);
	},
	async edit(data) {
	    return await http.post(`/metchon/edit`,data);
	},
	async querySbxxByQr(qrcode) {
	    return await http.get(`/metchon/querySbxxByQr?qrcode=${qrcode}`);
	},
	async getfaultListByType(sblx) {
	    return await http.post(`/metchon/getfaultListByType?sblx=${sblx}`);
	},
	async faultAdd(data) {
	    return await http.post(`/metchon/faultAdd`,data);
	},
	async inspectionAdd(data) {
	    return await http.post(`/metchon/inspectionAdd`,data);
	},
	
	async imagePath(imageName) {
	    return await http.get(`/sys/common/static/${imageName}`);
	}
	
}

export default metchonService;